﻿using System.Security.Cryptography;
using System.Text;

namespace Pyramid.Tools
{
	public static class Password
	{
		public static string Encryption(string password)
		{
			var md5 = MD5.Create();
			var data = md5.ComputeHash(Encoding.UTF8.GetBytes(password));
			var sb = new StringBuilder();
			for (var i = 0; i < data.Length; i++)
			{
				sb.Append(data[i].ToString("X"));
			}
			return sb.ToString();
		}
	}
}